<template>
  <div class="content_box">
    <div class="item" v-for="item in datas" :key="item.id" @click="goDetail(item)">
      {{item.gname}}
    </div>
    
  </div>
</template>

<script>
export default {
  props:{
    datas:{
      type:Array
    }
  },
  methods:{
    goDetail(item){
      this.$router.push({
        path: `/good/${item.id}`,
        query: {
          categroy_base_id: item.categroy_base_id
        }
      });
      
    }
  }
}
</script>

<style lang="less" scoped>
.content_box{
  padding: 10px;
  .item{
    margin: 5px;
    border-bottom: 1px solid #ccc;
    height: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
}
</style>